<%--
 *  File:    LoginAs.jsp
 *  @Author: Shine Zheng 
 *  Date:    2001/11/15
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.OvalLabel" %>
<%@ page import="com.oval.util.OvalCustomColumn" %>
<%@ page import="com.oval.util.OvalCustomMessage" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<% //--------------------------------------  setting logger --%>

<% 
   String strModuleName = "UPM";
   String privilegeCode = "Z0105";
   String strTableName = "ovuser";
%>



<%
   Category cat = Category.getInstance("jsp.upm.LoginAs");
%>
<% //--------------------------------------  include files list --%>

<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="../../js/FuncLib.js"></script>
</head>

<script language="JavaScript">

function loginCheck(form)
{
  if(isEmpty(form.username.value))
  {
    alert("<%= message.getMessageDesc("VALUE_NOT_NULL",label.getLabelName("L_UserName",false)) %>");
    form.username.focus();
    return false;
  }
  return true;
}

function page_login()
{
  if(!loginCheck(frm))
    return;
  isRunning = true;
  document.frm.submit();
}
</script>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0">
	<%@ include file="/inc/PageLocation.inc" %>
</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr> 
    <td valign="top"> 
      <form name="frm" method="post" action="../../Dispatcher" target="_top">
        <input type="hidden" name="pagename" value="consoleloginas" >
        <input type="hidden" name="actionname" value="login" >
        <input type="hidden" name="languagecode" value="<%= strLanguageCode %>" >
        
        <table width="100%" border="0" cellspacing="0">
          <tr> 
            <td class="summary_top" ></td>
          </tr>
        </table>
        <table width="100%" border="1" cellpadding="2" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
          <tr> 
            <td class="td-title" colspan="2"> 
              <div align="center" class="b"><%= label.getLabelName("L_LogIn") %></div>
            </td>
          </tr>
          <tr> 
            <td class="td-text" width="95"><%= label.getLabelName("L_OrgCode") %><%= label.getLabelName("L_Colon") %></td>
            <td> 
              <input type="text" name="orgcode" size="20">
            </td>
          </tr>
          <tr> 
            <td class="need"><%= label.getLabelName("L_UserName") %><%= label.getLabelName("L_Colon") %></td>
            <td> 
              <input id ="usernameid" type="text" name="username" size="20">
            </td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td class="summary_top" ></td>
          </tr>
          <tr> 
            <td class="td_center"> <a onclick="page_login()"><custom:button type="1" label="L_Login" imgsrc="finish.gif" border="0" style="width:60"/></a></td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
<script>
document.frm.username.focus();
</script>
<script>
document.getElementById("usernameid").onkeydown = function seachKeyDown(){
if(event.keyCode == 13){
	page_login();
  }
}
</script>
</body>
</html>


